package com.xmy.cultivate.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xmy.cultivate.converter.LocalDateConverter;
import com.xmy.cultivate.converter.LocalDateTimeConverter;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 客户列表
 * </p>
 *
 * @author min
 * @since 2023-02-11
 */
@TableName("enroll_customer")
@Data
public class EnrollCustomer implements Serializable {

    private static final long serialVersionUID = 1L;

    @ExcelIgnore
    private Long id;

    /**
     * 姓名
     */
    @ExcelProperty(index = 0,value = "客户名称")
    @ApiModelProperty("名称")
    private String name;

    @ExcelIgnore
    @ApiModelProperty("校区id")
    private Long schoolId;

    @ExcelIgnore
    private Long subjectsId;

    @ExcelIgnore
    private Long teamId;

    @ExcelIgnore
    private Integer yearPart;

    @ExcelIgnore
    private Integer quarterNum;

    @ExcelIgnore
    @ApiModelProperty("教师Id")
    private Long teacherId;

    @ExcelProperty(index = 2,value = "拿号码")
    @ApiModelProperty("教师姓名")
    private String teacherName;

    /**
     * 0，待邀约，1邀约失败，2已邀约，3未成交，4已成交
     */
    @ExcelIgnore
    @ApiModelProperty("0，待邀约，1邀约失败，2已邀约，3未成交，4已成交")
    private Integer status;

    /**
     * 1先生，2女士
     */
    @ExcelIgnore
    private Integer sex;

    @ExcelProperty(index = 7,value = "手机号码")
    @ApiModelProperty("手机号")
    private String phone;

    @ExcelIgnore
    @ApiModelProperty("备注")
    private String remark;

    @ExcelIgnore
    @ApiModelProperty("标签id")
    private String labelIds;

    @ExcelProperty(index = 11,value = "标签")
    private String labelStrs;

    @ExcelIgnore
    private LocalDateTime visitDateTime;

    @ExcelIgnore
    private String makeRemark;

    @ExcelIgnore
    private LocalDate addDate;

    @ExcelProperty(index = 13,value = "创建时间",converter = LocalDateTimeConverter.class)
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;

    @ExcelIgnore
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedAt;

    @ExcelIgnore
    @TableField(exist = false)
    private List<EnrollStudent> enrollStudentList;

    @ExcelIgnore
    @TableField(exist = false)
    private List<EnrollData> enrollDataList;

    @ExcelIgnore
    @TableField(exist = false)
    private List<EnrollCommunicate> enrollCommunicateList;

    @ExcelProperty(index = 1,value = "性别")
    @TableField(exist = false)
    private String sexStr;

    @ExcelProperty(index = 10,value = "状态")
    @TableField(exist = false)
    private String statusStr;

    @ExcelProperty(index = 12,value = "互动记录")
    @TableField(exist = false)
    private String content;

    @ExcelProperty(index = 9,value = "咨询校区")
    @TableField(exist = false)
    private String schoolStr;

    @ExcelProperty(index = 3,value = "邀约")
    @TableField(exist = false)
    private String invite;

    @ExcelProperty(index = 4,value = "试听")
    @TableField(exist = false)
    private String audition;

    @ExcelProperty(index = 5,value = "成交")
    @TableField(exist = false)
    private String make;

    @ExcelProperty(index = 6,value = "电话类型")
    @TableField(exist = false)
    private String phoneType;

    @ExcelProperty(index = 8,value = "已拨打数")
    @TableField(exist = false)
    private Integer frequency;

    @ExcelIgnore
    @TableField(exist = false)
    private Integer phoneCount;

    /**
     * 话术id
     */
    @ExcelIgnore
    @TableField(exist = false)
    List<Long> speechIdList;

    /**
     * 邀约详情
     */
    @ExcelIgnore
    @TableField(exist = false)
    List<EnrollInviteDetail> enrollInviteDetailList;

    /**
     * 邀约失败原因
     */
    @ExcelIgnore
    @TableField(exist = false)
    private List<EnrollInviteFailCause> enrollInviteFailCauseList;

    /**
     * 1正常，2其它原因
     */
    @ExcelIgnore
    @TableField(exist = false)
    private Integer type;

    @ExcelIgnore
    @TableField(exist = false)
    private List<EnrollCustomer> enrollCustomerList;

}
